﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GestionePolveriLib.Facades;
using GestionePolveriLib.Utilities;

namespace GestionePolveri2
{
    public partial class GeneralToolbar : UserControl
    {
        public GeneralToolbar()
        {
            InitializeComponent();

            if (!this.DesignMode)
            {
                Initialize();
            }
        }

        private void Initialize()
        {
            LoadTurni();
        }

        private void LoadTurni()
        {
            TurniFacade tf = new TurniFacade();

            tf.LoadTurniAsync((result) =>
            {
                this.tsCmbTurni.ComboBox.LoadData("Descrizione", "ID", result);
            });
        }
    }
}
